/*
 * @Author: DUST
 * @Date: 2023-06-09 11:19:13
 * @LastEditors: DUST
 * @LastEditTime: 2023-06-09 11:39:52
 * @FilePath: \vite-project\src\utils\highlight.ts
 * @Description: 
 * undefined
 */
// highlight.js  代码高亮指令
import Hljs from 'highlight.js';
import 'highlight.js/styles/atom-one-dark.css';

const Highlight = (el: Element) => {
  let blocks = el.querySelectorAll('pre code');
  blocks.forEach((block: any)=>{
    Hljs.highlightBlock(block)
  })
}
 
export default Highlight;
